<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output
	encoding="UTF-8"
	method="xml"
	indent="yes"
	media-type="text/xhtml"
/>

<xsl:template match="/">
	<html lang="en">
	<head><title>Sitemap</title></head>
	<body>
	<h1>Sitemap</h1>
	<p>Elements: <xsl:value-of select="count(//loc)"/></p>
	<ul>
    <xsl:for-each select="//loc">
    	<xsl:sort></xsl:sort>
    	<li><a><xsl:attribute name="href"><xsl:apply-templates /></xsl:attribute><xsl:apply-templates /></a></li>
	</xsl:for-each>
	</ul>
	</body>
	</html>
</xsl:template>

</xsl:stylesheet>